package com.teemor.blog.api;

import com.teemor.blog.bean.dto.input.article.AddArticleIDTo;
import com.teemor.blog.bean.dto.input.article.QryArticlesIDTo;
import com.teemor.blog.bean.dto.input.article.UpdArticleIDTo;
import com.teemor.common.bean.utils.tmpl.ResponseBen;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;

import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 *  * @author: zhoulk
 *  * @Description: 原子服务API接口
 *  * @date: 2019/11/26 14:50:14
 */
@Api(tags = "文章管理")
@RequestMapping(value = "/article")
public interface IArticleApiService {


    @ApiOperation("新增")
    @PostMapping
    String addArticle(@RequestBody AddArticleIDTo inParam);


    @ApiOperation("删除")
    @DeleteMapping
    String delArticle(@RequestParam Integer atcId);

    @ApiOperation("查询")
    @GetMapping
    String qryArticle(@RequestParam Integer atcId, @RequestParam Integer flag, String ip);


    @ApiOperation("修改")
    @PutMapping
    void updArticle(@RequestBody UpdArticleIDTo inParam);

    @ApiOperation("列表")
    @GetMapping(value = "/list")
    String qryArticles(@ModelAttribute QryArticlesIDTo inParam);


    @ApiOperation("搜索")
    @GetMapping(value = "/search")
    String searchArticles(QryArticlesIDTo inParam, String scrollId);

    @ApiOperation("归档")
    @GetMapping(value = "/archive")
    String archive();

    @ApiOperation("修改状态")
    @PutMapping(value = "/state")
    String updAtcState(@RequestParam Integer atcId, @RequestParam Integer atcState);

    @ApiOperation("点赞")
    @GetMapping(value = "/praise")
    ResponseBen<Integer> praise(@RequestParam Integer atcId, @RequestParam Integer type, String ip);
}